import 'package:flutter_audit_app/model/dictionaries_response.dart';

class UserBean {
  String id;
  String basicCode; //个人编号
  String socialSecNo; //社保卡号
  String name; //姓名
  String gender; //性别(字典)
  String idCardNo; //身份证号码
  int age; //年龄
  String address; //联系住址
  String contact; //联系方式
  String retirementLogo; //离退休标志(字典)
  String workUnitInformation; //单位信息
  String insuredCoverage; //参保险种(字典)
  String insuredPlace; //参保地
  String designatedHospitalsOne; //定点医院一
  String designatedHospitalsTwo; //定点医院二
  String designatedHospitalsThree; //定点医院三
  String designatedHospitalsFour; //定点医院四
  String outpatientAll; //门诊/门慢统筹限额
  String outpatientLeft; //门诊/门慢还可享受金额
  String specialAll; //门特统筹限额
  String specialLeft; //门特还可享受金额
  String passDiseasesName; //门诊单病种通过病种名称
  String diseasesAll; //门诊单病种待遇限额
  String specialMed; //特药
  List<Dictionaries> reliefInformation; //救助特困信息预留字段
  List<Dictionaries> examineInformation; //审批信息预留字段
  List<Dictionaries> immediateFamily; //直系家庭成员预留字段

  UserBean(
      {this.id,
      this.basicCode,
      this.socialSecNo,
      this.name,
      this.gender,
      this.idCardNo,
      this.age,
      this.address,
      this.contact,
      this.retirementLogo,
      this.workUnitInformation,
      this.insuredCoverage,
      this.insuredPlace,
      this.designatedHospitalsOne,
      this.designatedHospitalsTwo,
      this.designatedHospitalsThree,
      this.designatedHospitalsFour,
      this.outpatientAll,
      this.outpatientLeft,
      this.specialAll,
      this.specialLeft,
      this.passDiseasesName,
      this.diseasesAll,
      this.specialMed,
      this.reliefInformation,
      this.examineInformation,
      this.immediateFamily});

  UserBean.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    basicCode = json['basicCode'];
    socialSecNo = json['socialSecNo'];
    name = json['name'];
    gender = json['gender'];
    idCardNo = json['idCardNo'];
    age = json['age'];
    address = json['address'];
    contact = json['contact'];
    retirementLogo = json['retirementLogo'];
    workUnitInformation = json['workUnitInformation'];
    insuredCoverage = json['insuredCoverage'];
    insuredPlace = json['insuredPlace'];
    designatedHospitalsOne = json['designatedHospitalsOne'];
    designatedHospitalsTwo = json['designatedHospitalsTwo'];
    designatedHospitalsThree = json['designatedHospitalsThree'];
    designatedHospitalsFour = json['designatedHospitalsFour'];
    outpatientAll = json['outpatientAll'];
    outpatientLeft = json['outpatientLeft'];
    specialAll = json['specialAll'];
    specialLeft = json['specialLeft'];
    passDiseasesName = json['passDiseasesName'];
    diseasesAll = json['diseasesAll'];
    specialMed = json['specialMed'];
    if (json['reliefInformation'] != null) {
      reliefInformation = new List<Dictionaries>();
      json['reliefInformation'].forEach((v) {
        reliefInformation.add(new Dictionaries.fromJson(v));
      });
    }
    if (json['examineInformation'] != null) {
      examineInformation = new List<Dictionaries>();
      json['examineInformation'].forEach((v) {
        examineInformation.add(new Dictionaries.fromJson(v));
      });
    }
    if (json['immediateFamily'] != null) {
      immediateFamily = new List<Dictionaries>();
      json['immediateFamily'].forEach((v) {
        immediateFamily.add(new Dictionaries.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['basicCode'] = this.basicCode;
    data['socialSecNo'] = this.socialSecNo;
    data['name'] = this.name;
    data['gender'] = this.gender;
    data['idCardNo'] = this.idCardNo;
    data['age'] = this.age;
    data['address'] = this.address;
    data['contact'] = this.contact;
    data['retirementLogo'] = this.retirementLogo;
    data['workUnitInformation'] = this.workUnitInformation;
    data['insuredCoverage'] = this.insuredCoverage;
    data['insuredPlace'] = this.insuredPlace;
    data['outpatientAll'] = this.outpatientAll;
    data['outpatientLeft'] = this.outpatientLeft;
    data['specialAll'] = this.specialAll;
    data['specialLeft'] = this.specialLeft;
    data['passDiseasesName'] = this.passDiseasesName;
    data['diseasesAll'] = this.diseasesAll;
    data['specialMed'] = this.specialMed;
    data['designatedHospitalsOne'] = this.designatedHospitalsOne;
    data['designatedHospitalsTwo'] = this.designatedHospitalsTwo;
    data['designatedHospitalsThree'] = this.designatedHospitalsThree;
    data['designatedHospitalsFour'] = this.designatedHospitalsFour;
    if (this.reliefInformation != null) {
      data['reliefInformation'] =
          this.reliefInformation.map((v) => v.toJson()).toList();
    }
    if (this.examineInformation != null) {
      data['examineInformation'] =
          this.examineInformation.map((v) => v.toJson()).toList();
    }
    if (this.immediateFamily != null) {
      data['immediateFamily'] =
          this.immediateFamily.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
